package com.pokeoffice.builder;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Vector;

import com.pokeoffice.calendar.Visit;

/**
 * The Class VisitBuilder.
 */
public class VisitBuilder {

	/**
	 * Builds the Visit Vector from result set.
	 *
	 * @param rs the rs
	 * @return the vector
	 */
	public static Vector<Visit> buildFromResultSet(ResultSet rs) {
		Vector<Visit> vis = new Vector<Visit>();

		try {
			while (rs.next()) {
				Visit v = new Visit(rs.getLong(1), rs.getLong(2),
						rs.getLong(3), rs.getLong(4), rs.getLong(5), rs
								.getString(6), rs.getString(7));
				
				vis.add(v);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}

		return vis;
	}

	/**
	 * Builds the one from result set.
	 *
	 * @param rs the rs
	 * @return the visit
	 */
	public static Visit buildOneFromResultSet(ResultSet rs) {
 		return null;
	}

}
